﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="FormUploadDokumen.aspx.vb" Inherits="bisaska.Form_Entry_Upload_Dokumen" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

        <form id="form1" runat="server" >
    
               &nbsp;<asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
                &nbsp;<asp:SqlDataSource ID="Data_Source_SKA_Dokumen" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bisaska %>" SelectCommand="select
a.id_dokumen,
  b.id_arsip,
  a.no_dokumen,
  nama_dokumen,
  a.perihal,
  tanggal,
  c.jenis_dok,
  d.kode_divisi,
  a.pihak_pengirim,
  pihak_dituju,
  e.bidang_dok,
  f.sifat_dok
from
  T_SKA_DOKUMEN a
  join T_SKA_ARSIP b
  on a.id_arsip=b.id_arsip
  join T_MST_JENIS_DOK c
  on a.id_jenis_dok = c.id_jenis_dok
  join T_MST_DIVISI d
  on a.id_divisi=d.id_divisi
  join T_MST_BIDANG_DOK e
  on a.id_bidang_dok=e.id_bidang_dok
  join T_SKA_SIFAT_DOK f
  on a.id_sifat_dok=f.id_sifat_dok"
  DeleteCommand="DELETE FROM [T_SKA_DOKUMEN] WHERE [id_dokumen] = @id_dokumen">
                    <DeleteParameters>
                        <asp:Parameter Name="id_dokumen" Type="Int64" />
                    </DeleteParameters>
                </asp:SqlDataSource>
                
                   
                
                
                    <ContentTemplate>
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" CellPadding="4" DataKeyNames="id_dokumen" 
                            DataSourceID="Data_Source_SKA_Dokumen" ForeColor="#333333" GridLines="None" 
                            PageSize="5">
                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                            <Columns>
                                <asp:BoundField DataField="id_dokumen" HeaderText="id_dokumen" 
                                    InsertVisible="False" SortExpression="id_dokumen" />
                                <asp:BoundField DataField="id_arsip" HeaderText="id_arsip" 
                                    InsertVisible="False" ReadOnly="True" SortExpression="id_arsip" />
                                <asp:BoundField DataField="no_dokumen" HeaderText="no_dokumen" 
                                    SortExpression="no_dokumen" />
                                <asp:BoundField DataField="nama_dokumen" HeaderText="nama_dokumen" 
                                    SortExpression="nama_dokumen" />
                                <asp:BoundField DataField="perihal" HeaderText="perihal" 
                                    SortExpression="perihal" />
                                <asp:BoundField DataField="tanggal" HeaderText="tanggal" 
                                    SortExpression="tanggal" />
                                <asp:BoundField DataField="jenis_dok" HeaderText="jenis_dok" 
                                    SortExpression="jenis_dok" />
                                <asp:BoundField DataField="kode_divisi" HeaderText="Divisi" 
                                    SortExpression="kode_divisi" />
                                <asp:BoundField DataField="pihak_pengirim" HeaderText="pihak_pengirim" 
                                    SortExpression="pihak_pengirim" />
                                <asp:BoundField DataField="pihak_dituju" HeaderText="pihak_dituju" 
                                    SortExpression="pihak_dituju" />
                                <asp:BoundField DataField="bidang_dok" HeaderText="bidang_dok" 
                                    SortExpression="bidang_dok" />
                                <asp:BoundField DataField="sifat_dok" HeaderText="sifat_dok" 
                                    SortExpression="sifat_dok" />
                                <asp:CommandField SelectText="Edit" ShowSelectButton="True" />
                                <asp:TemplateField HeaderText="ACTION">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="deleteButton" runat="server" CommandName="Delete" 
                                            OnClientClick="return confirm('Yakin Mau Hapus Data Ini?');" Text="Delete" />
                                    </ItemTemplate>
                                    <ControlStyle ForeColor="Black" />
                                    <HeaderStyle BorderStyle="None" />
                                </asp:TemplateField>
                                <asp:ButtonField CommandName="btnCopy" Text="Copy" />
                            </Columns>
                            <EditRowStyle BackColor="#999999" />
                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#E9E7E2" />
                            <SortedAscendingHeaderStyle BackColor="#506C8C" />
                            <SortedDescendingCellStyle BackColor="#FFFDF8" />
                            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                        </asp:GridView>
                    </ContentTemplate>
                
                <asp:SqlDataSource ID="Data_Source_Arsip" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bisaska %>" 
                    
                    
                   SelectCommand="SELECT [id_arsip] FROM [T_SKA_ARSIP]"></asp:SqlDataSource>
                <asp:SqlDataSource ID="Data_Source_Jenis_Dokumen" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bisaska %>" 
                    SelectCommand="SELECT [jenis_dok] FROM [T_MST_JENIS_DOK]">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="Data_Source_Divisi" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bisaska %>" 
                    SelectCommand="SELECT [kode_divisi] FROM [T_MST_DIVISI]"></asp:SqlDataSource>
                <asp:SqlDataSource ID="Data_Source_Bidang_Dokumen" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bisaska %>" 
                    SelectCommand="SELECT [bidang_dok] FROM [T_MST_BIDANG_DOK]">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="Data_Source_Sifat_Dokumen" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bisaska %>" 
                    SelectCommand="SELECT [sifat_dok] FROM [T_SKA_SIFAT_DOK]">
                </asp:SqlDataSource>
            
               <asp:Button ID="Button4" runat="server" Text="Add New" 
                    CausesValidation="False" CssClass="addnew" />
           
            </div>
           
            <div class="editbox">
            <table runat = "server" id="tabel1" >
            <tr>
                    <td><span class="font">Arsip:</span></td>
                    <td class="style1">
                        <asp:DropDownList ID="dropdownlist1" runat="server" 
                            DataSourceID="Data_Source_Arsip" DataTextField="id_arsip" 
                            DataValueField="id_arsip"></asp:DropDownList></td>
                    <td><span class="font">Jenis Dokumen:</span></td>
                    <td><asp:DropDownList ID="dropdownlist2" runat="server" 
                            DataSourceID="Data_Source_Jenis_Dokumen" DataTextField="jenis_dok" 
                            DataValueField="jenis_dok"></asp:DropDownList></td>
            </tr>
            <tr>
                    <td><span class="font">No Dokumen:</span></td>
                    <td class="style1"><asp:TextBox ID="textbox1" runat="server" CssClass="textbox"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                            ControlToValidate="textbox1" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                    <td>Divisi<span class="font"> Pemilik:</span></td>
                    <td><asp:DropDownList ID="dropdownlist3" runat="server" 
                            DataSourceID="Data_Source_Divisi" DataTextField="kode_divisi" 
                            DataValueField="kode_divisi"></asp:DropDownList></td>
            </tr>
            <tr>
                    <td><span class="font">Nama Dokumen:</span></td>
                    <td class="style1"><asp:TextBox ID="textbox2" runat="server" CssClass="textbox"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                            ControlToValidate="textbox2" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                    <td><span class="font">Pihak Pengirim:</span></td>
                    <td><asp:TextBox ID="textbox3" runat="server" CssClass="textbox"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                            ControlToValidate="textbox3" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>

            </tr>
            <tr>
                    <td valign="top"><span class="font">Perihal:</span></td>
                    <td valign="top" class="style1"><asp:TextBox ID="textbox4" runat="server" CssClass="textbox" Height="70px" MaxLength="150" TextMode="MultiLine"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                            ControlToValidate="textbox4" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                    <td valign="top" colspan="2"><span class="font">Pihak Dituju :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    <asp:TextBox ID="textbox5" runat="server" CssClass="textbox"></asp:TextBox> 
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                            ControlToValidate="textbox5" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                        <br /><br />
                    <span class="font">Bidang Dokumen:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    <asp:DropDownList ID="dropdownlist4" runat="server" 
                            DataSourceID="Data_Source_Bidang_Dokumen" DataTextField="bidang_dok" 
                            DataValueField="bidang_dok"></asp:DropDownList></td>
            </tr>
            <tr>
                    <td valign="top"><span class="font">Tanggal Dokumen:</span></td>
                    <td valign="top" class="style1"><asp:TextBox ID="textbox6" runat="server" CssClass="textbox"></asp:TextBox>
                        <asp:CalendarExtender ID="textbox6_CalendarExtender" runat="server" 
                            Enabled="True" TargetControlID="textbox6" Format="dd/MM/yyyy">
                        </asp:CalendarExtender>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                            ControlToValidate="textbox6" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                    <td valign="top" colspan="2"><span class="font">Sifat Dokumen:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    <asp:DropDownList ID="dropdownlist5" runat="server" 
                            DataSourceID="Data_Source_Sifat_Dokumen" DataTextField="sifat_dok" 
                            DataValueField="sifat_dok"></asp:DropDownList> <br />
                    <span class="font">Upload Dokumen:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    <asp:TextBox ID="textbox7" runat="server" CssClass="textbox"></asp:TextBox>
                    <asp:Button ID="button1" runat="server" Text="Browse" CssClass="addnew" 
                            CausesValidation="False" />
                    </td>
            </tr>
            <tr>
                    <td colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <asp:Button ID="button2" runat="server" Text="Save" CssClass="tombol"></asp:Button>
                         <asp:Button ID="button3" runat="server" Text="Cancel" CssClass="tombol" 
                            CausesValidation="False"></asp:Button></td>

                </tr>
            </table>
           
            
    </form>
  

</asp:Content>
